<template>
    <div v-loading="loading">
        <template v-for="(item) in forms" :key="item.id">
            <FinanceInfoTable :list="formList" :form="item" />
        </template>
    </div>
</template>

<script setup>
import { getFincanciaReport } from '@/api/taxReportManage';
import FinanceInfoTable from '../components/financeInfoTable';
const route = useRoute()
const forms = ref({})
const loading = ref(false)
const formList = ref([
    {
        label: '申报收入',
        prop: 'declared_income',
        unit: ''
    },
    {
        label: '申报差异',
        prop: 'declared_variance',
        unit: ''
    },
    {
        label: '申报资产',
        prop: 'declared_assets',
        unit: ''
    },
    {
        label: '资产比率',
        prop: 'asset_ratio',
        unit: '%'
    },
    {
        label: '申报负债',
        prop: 'declared_liabilities',
        unit: ''
    },
    {
        label: '负债比率',
        prop: 'liability_ratio',
        unit: '%'
    },
    {
        label: '申报利润',
        prop: 'declared_profit',
        unit: ''
    },
    {
        label: '利润比率',
        prop: 'profit_ratio',
        unit: '%'
    },
    {
        label: '营业成本',
        prop: 'operating_cost',
        unit: ''
    },
    {
        label: '成本比率',
        prop: 'cost_ratio',
        unit: '%'
    },
    {
        label: '销售成本',
        prop: 'sales_cost',
        unit: ''
    },
    {
        label: '销售比率',
        prop: 'sales_ratio',
        unit: '%'
    },
    {
        label: '管理成本',
        prop: 'management_cost',
        unit: ''
    },
    {
        label: '管理比率',
        prop: 'management_ratio',
        unit: '%'
    },
    {
        label: '财务成本',
        prop: 'financial_cost',
        unit: ''
    },
    {
        label: '财务比例',
        prop: 'financial_ratio',
        unit: '%'
    },
])
getInfo()
function getInfo() {
    const reqForm = { id: route.query.id }
    loading.value = true
    getFincanciaReport(reqForm).then(res => {
        forms.value = res.data
    }).finally(() => loading.value = false)
}
</script>

<style lang="scss" scoped></style>